3.281 \(\int \frac {x^2 (d+e x)}{a+c x^2} \, dx\)

Optimal. Leaf size=61 \[ -\frac {\sqrt {a} d \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{c^{3/2}}-\frac {a e \log \left (a+c x^2\right )}{2 c^2}+\frac {d x}{c}+\frac {e x^2}{2 c} \]

[Out]

d*x/c+1/2*e*x^2/c-1/2*a*e*ln(c*x^2+a)/c^2-d*arctan(x*c^(1/2)/a^(1/2))*a^(1/2)/c^(3/2)

________________________________________________________________________________________

Rubi [A]  time = 0.04, antiderivative size = 61, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.222, Rules used = {801, 635, 205, 260} \[ -\frac {\sqrt {a} d \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{c^{3/2}}-\frac {a e \log \left (a+c x^2\right )}{2 c^2}+\frac {d x}{c}+\frac {e x^2}{2 c} \]

Antiderivative was successfully verified.

[In]

Int[(x^2*(d + e*x))/(a + c*x^2),x]

[Out]

(d*x)/c + (e*x^2)/(2*c) - (Sqrt[a]*d*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/c^(3/2) - (a*e*Log[a + c*x^2])/(2*c^2)

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rule 260

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 635

Int[((d_) + (e_.)*(x_))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Dist[d, Int[1/(a + c*x^2), x], x] + Dist[e, Int[x/
(a + c*x^2), x], x] /; FreeQ[{a, c, d, e}, x] &&  !NiceSqrtQ[-(a*c)]

Rule 801

Int[(((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_)))/((a_) + (c_.)*(x_)^2), x_Symbol] :> Int[ExpandIntegrand[(
(d + e*x)^m*(f + g*x))/(a + c*x^2), x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[c*d^2 + a*e^2, 0] && Integer
Q[m]

Rubi steps

\begin {align*} \int \frac {x^2 (d+e x)}{a+c x^2} \, dx &=\int \left (\frac {d}{c}+\frac {e x}{c}-\frac {a d+a e x}{c \left (a+c x^2\right )}\right ) \, dx\\ &=\frac {d x}{c}+\frac {e x^2}{2 c}-\frac {\int \frac {a d+a e x}{a+c x^2} \, dx}{c}\\ &=\frac {d x}{c}+\frac {e x^2}{2 c}-\frac {(a d) \int \frac {1}{a+c x^2} \, dx}{c}-\frac {(a e) \int \frac {x}{a+c x^2} \, dx}{c}\\ &=\frac {d x}{c}+\frac {e x^2}{2 c}-\frac {\sqrt {a} d \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{c^{3/2}}-\frac {a e \log \left (a+c x^2\right )}{2 c^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.02, size = 56, normalized size = 0.92 \[ \frac {-2 \sqrt {a} \sqrt {c} d \tan ^{-1}\left (\frac {\sqrt {c} x}{\sqrt {a}}\right )-a e \log \left (a+c x^2\right )+c x (2 d+e x)}{2 c^2} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^2*(d + e*x))/(a + c*x^2),x]

[Out]

(c*x*(2*d + e*x) - 2*Sqrt[a]*Sqrt[c]*d*ArcTan[(Sqrt[c]*x)/Sqrt[a]] - a*e*Log[a + c*x^2])/(2*c^2)

________________________________________________________________________________________

fricas [A]  time = 0.92, size = 127, normalized size = 2.08 \[ \left [\frac {c e x^{2} + c d \sqrt {-\frac {a}{c}} \log \left (\frac {c x^{2} - 2 \, c x \sqrt {-\frac {a}{c}} - a}{c x^{2} + a}\right ) + 2 \, c d x - a e \log \left (c x^{2} + a\right )}{2 \, c^{2}}, \frac {c e x^{2} - 2 \, c d \sqrt {\frac {a}{c}} \arctan \left (\frac {c x \sqrt {\frac {a}{c}}}{a}\right ) + 2 \, c d x - a e \log \left (c x^{2} + a\right )}{2 \, c^{2}}\right ] \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(c*x^2+a),x, algorithm="fricas")

[Out]

[1/2*(c*e*x^2 + c*d*sqrt(-a/c)*log((c*x^2 - 2*c*x*sqrt(-a/c) - a)/(c*x^2 + a)) + 2*c*d*x - a*e*log(c*x^2 + a))
/c^2, 1/2*(c*e*x^2 - 2*c*d*sqrt(a/c)*arctan(c*x*sqrt(a/c)/a) + 2*c*d*x - a*e*log(c*x^2 + a))/c^2]

________________________________________________________________________________________

giac [A]  time = 0.20, size = 56, normalized size = 0.92 \[ -\frac {a d \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} - \frac {a e \log \left (c x^{2} + a\right )}{2 \, c^{2}} + \frac {c x^{2} e + 2 \, c d x}{2 \, c^{2}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(c*x^2+a),x, algorithm="giac")

[Out]

-a*d*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*c) - 1/2*a*e*log(c*x^2 + a)/c^2 + 1/2*(c*x^2*e + 2*c*d*x)/c^2

________________________________________________________________________________________

maple [A]  time = 0.05, size = 53, normalized size = 0.87 \[ -\frac {a d \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}\, c}+\frac {e \,x^{2}}{2 c}-\frac {a e \ln \left (c \,x^{2}+a \right )}{2 c^{2}}+\frac {d x}{c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^2*(e*x+d)/(c*x^2+a),x)

[Out]

1/2/c*e*x^2+1/c*d*x-1/2*a*e*ln(c*x^2+a)/c^2-a/c*d/(a*c)^(1/2)*arctan(1/(a*c)^(1/2)*c*x)

________________________________________________________________________________________

maxima [A]  time = 1.16, size = 52, normalized size = 0.85 \[ -\frac {a d \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c} c} - \frac {a e \log \left (c x^{2} + a\right )}{2 \, c^{2}} + \frac {e x^{2} + 2 \, d x}{2 \, c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^2*(e*x+d)/(c*x^2+a),x, algorithm="maxima")

[Out]

-a*d*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*c) - 1/2*a*e*log(c*x^2 + a)/c^2 + 1/2*(e*x^2 + 2*d*x)/c

________________________________________________________________________________________

mupad [B]  time = 1.06, size = 49, normalized size = 0.80 \[ \frac {e\,x^2}{2\,c}+\frac {d\,x}{c}-\frac {\sqrt {a}\,d\,\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )}{c^{3/2}}-\frac {a\,e\,\ln \left (c\,x^2+a\right )}{2\,c^2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((x^2*(d + e*x))/(a + c*x^2),x)

[Out]

(e*x^2)/(2*c) + (d*x)/c - (a^(1/2)*d*atan((c^(1/2)*x)/a^(1/2)))/c^(3/2) - (a*e*log(a + c*x^2))/(2*c^2)

________________________________________________________________________________________

sympy [B]  time = 0.45, size = 151, normalized size = 2.48 \[ \left (- \frac {a e}{2 c^{2}} - \frac {d \sqrt {- a c^{5}}}{2 c^{4}}\right ) \log {\left (x + \frac {- a e - 2 c^{2} \left (- \frac {a e}{2 c^{2}} - \frac {d \sqrt {- a c^{5}}}{2 c^{4}}\right )}{c d} \right )} + \left (- \frac {a e}{2 c^{2}} + \frac {d \sqrt {- a c^{5}}}{2 c^{4}}\right ) \log {\left (x + \frac {- a e - 2 c^{2} \left (- \frac {a e}{2 c^{2}} + \frac {d \sqrt {- a c^{5}}}{2 c^{4}}\right )}{c d} \right )} + \frac {d x}{c} + \frac {e x^{2}}{2 c} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**2*(e*x+d)/(c*x**2+a),x)

[Out]

(-a*e/(2*c**2) - d*sqrt(-a*c**5)/(2*c**4))*log(x + (-a*e - 2*c**2*(-a*e/(2*c**2) - d*sqrt(-a*c**5)/(2*c**4)))/
(c*d)) + (-a*e/(2*c**2) + d*sqrt(-a*c**5)/(2*c**4))*log(x + (-a*e - 2*c**2*(-a*e/(2*c**2) + d*sqrt(-a*c**5)/(2
*c**4)))/(c*d)) + d*x/c + e*x**2/(2*c)

________________________________________________________________________________________